//
//  CustomJudgeTableViewCell.m
//  ChunLaiZhuangClient
//
//  Created by zzs on 16/4/16.
//  Copyright © 2016年 CLZ. All rights reserved.
//

#import "CustomJudgeTableViewCell.h"
#import "JudgeForProductViewController.h"
@implementation CustomJudgeTableViewCell

- (void)awakeFromNib {
    // Initialization code
    self.lineConstraint.constant=0.5;
    self.judgeBt.layer.cornerRadius=12;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (IBAction)judgeAction:(id)sender {
    JudgeForProductViewController *judgeVC=[[JudgeForProductViewController alloc] init];
    UIViewController *currentVC=[CustomJudgeTableViewCell viewController:self];
    judgeVC.detailModel=_detailModel;
    [currentVC.navigationController pushViewController:judgeVC animated:YES];
    
}

-(void)setDetailModel:(JudgeDetailModel *)detailModel{
    _detailModel=detailModel;
    [self.productImageView sd_setImageWithURL:[NSURL URLWithString:detailModel.image] placeholderImage:nil];
    self.nameLabel.text=detailModel.name;
    self.countLabel.text=[NSString stringWithFormat:@"共%@件",detailModel.quantity];
    self.totalLabel.text=[NSString stringWithFormat:@"%@",detailModel.total];
}
@end
